<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>基本信息</title>
    <link rel="stylesheet" type="text/css" href="layui/css/layui.css">
    <script src="layui/layui.js"></script>


    <!-- cdn -->
    <!-- <link rel="stylesheet" type="text/css" href="https://www.layuicdn.com/layui/css/layui.css" />
    <script src="https://www.layuicdn.com/layui/layui.js"></script> -->
</head>



<body>

    <form class="layui-form" action="https:www.baidu.com" style="padding: 20px;">
        <div class="layui-form-item">
            <label class="layui-form-label">平台名称</label>
            <div class=" layui-col-md6">
                <input type="text" name="title" required lay-verify="required" placeholder="请输入平台名称" autocomplete="off"
                    class="layui-input">
            </div>
        </div>


        <div class="layui-form-item">
            <label class="layui-form-label">平台logo</label>
            <div class="layui-input-inline">
                <button type="button" class="layui-btn" id="upload">
                    <i class="layui-icon">&#xe67c;</i>上传图片
                </button>
            </div>
        </div>



        <div class="layui-form-item">
            <label class="layui-form-label">客服电话</label>
            <div class="layui-col-md6">
                <input type="text" name="text" required lay-verify="required" placeholder="请输入客服电话" autocomplete="off"
                    class="layui-input">
            </div>

        </div>


        <div class="layui-form-item">
            <label class="layui-form-label">邮箱</label>
            <div class="layui-col-md6">
                <input type="text" name="title" required lay-verify="required" placeholder="请输入邮箱" autocomplete="off"
                    class="layui-input">
            </div>
        </div>



        <div class="layui-form-item">
            <label class="layui-form-label">版本号 </label>
            <div class="layui-input-block">
                <label type="text" class="layui-form-label" style="text-align: left;">1.02</label>
            </div>

        </div>



        <div class="layui-form-item">
            <div class="layui-input-block">
                <!-- lay-filter 在layui中作为id -->
                <input class="layui-btn" lay-submit lay-filter="formSubmit" value="立即提交" type="submit">
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>

    </form>


    <script>
        //Demo
        layui.use(['form', 'element', 'layer', 'upload'], function () {
            var form = layui.form;
            var element = layui.element;
            var layer = layui.layer;
            //监听提交
            form.on('submit(formSubmit)', function (data) {
                layer.msg(JSON.stringify(data.field));
                return true;
            });

            element.on('collapse(test-collapse)', function (data) {
                layer.msg('展开状态：' + data.show);
            });



            var upload = layui.upload;

            //执行实例
            var uploadInst = upload.render({
                elem: '#upload' //绑定元素
                , url: '/upload/' //上传接口
                , done: function (res) {
                    //上传完毕回调
                }
                , error: function () {
                    //请求异常回调
                }
            });

        });



//layer.alert('见到你真的很高兴', {icon: 6});
    </script>




</body>

</html>
